package com.hko.qrip.dao.impl;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;

import com.hko.qrip.bean.WtwsAlert;
import com.hko.qrip.dao.WtwsDao;
import com.ibatis.sqlmap.client.SqlMapClient;

public class WtwsDaoImpl implements WtwsDao {
	@Autowired
	private SqlMapClient sqlMapClient;

	@Override
	public int insertAlert(WtwsAlert alert) {
		try {
			return sqlMapClient.update("insertWtwsAlert", alert);
		} catch (SQLException e) {
			return 0;
		}
	}

	@Override
	public int insertTurbAlert(WtwsAlert alert) {
		try {
			return sqlMapClient.update("insertWtwsTurbAlert", alert);
		} catch (SQLException e) {
			return 0;
		}
	}

}
